{% load crispy_forms_tags %}

<div class="tw:flex tw:flex-col">
    <form method="post" enctype="multipart/form-data" {% if in_edit %}action="{% url 'project:human_genetic_resource/update' project_pk=project.id %}"{% endif %}>
        {% csrf_token %}
        
        {{ form|crispy }}

        {% for config in formset_configs %}
            {% with formset=config.formset title=config.title form_type=config.form_type %}
                {% include "./partials/formset.html" with index=forloop.counter0 %}
            {% endwith %}
        {% endfor %}

        <div class="tw:flex tw:flex-row-reverse tw:mt-2">
            {% if in_create or in_edit %}
                <button type="submit" class="tw:btn tw:btn-neutral"> {% trans '提交' %} </button>
            {% endif %}
        </div>
    </form>
</div>
